<admintpl file="header" />
<style>
.home_info li em {
	float: left;
	width: 120px;
	font-style: normal;
}
li {
	list-style: none;
}
</style>
</head>
<body>
	<div class="wrap">
		<div id="home_toptip"></div>
		<!-- <h4 class="well">财务信息</h4> -->
		<div class="home_info">
			<ul id="thinkcmf_notices">
				<li><li><em>用户数量</em> <span>{$home['recharge_user_count']}</span></li></li>
				<li><li><em>合计充值</em> <span>{:money_number_format($home['recharge_money_sum'])}</span></li></li>
				<li><li><em>合计消费</em> <span>{$home['charge_money_sum']}</span></li></li>
                <li><li><em>合计余额</em> <span>{$home['recharge_money_sum']-$home['charge_money_sum']}</span></li></li>
			</ul>
		</div>
		<!-- <h4 class="well">客户充值TOP20</h4> -->

		 <form class="well form-search" method="post" action="{:U('Main/index')}">
            <a class="btn <if condition='$Think.get.type eq 1 AND $Think.get.value eq 1'>btn-danger<else />btn-success</if>" href="{:U('Main/index',array('type'=>1,'value'=>1))}">今日</a>
            <a class="btn <if condition='$Think.get.type eq 1 AND $Think.get.value eq 2'>btn-danger<else />btn-success</if>" href="{:U('Main/index',array('type'=>1,'value'=>2))}">昨日</a>
            <a class="btn <if condition='$Think.get.type eq 1 AND $Think.get.value eq 3'>btn-danger<else />btn-success</if>" href="{:U('Main/index',array('type'=>1,'value'=>3))}">上一周</a>
            <a class="btn <if condition='$Think.get.type eq 1 AND $Think.get.value eq 4'>btn-danger<else />btn-success</if>" href="{:U('Main/index',array('type'=>1,'value'=>4))}">上一个月</a>
            <a class="btn <if condition='$Think.get.type eq 1 AND $Think.get.value eq 5'>btn-danger<else />btn-success</if>" href="{:U('Main/index',array('type'=>1,'value'=>5))}">上三个月</a>
            <input style="width:150px" id="begin_time" type="date" name="begin_time" value="{$begin_time}"/>至
            <input style="width:150px" id="end_time" type="date" name="end_time" value="{$end_time}"/>
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:U('Main/index')}">清空</a>

        </form>
        <p>客户充值TOP20</p>
        <table class="table table-hover table-bordered ">
			<thead>
				<tr>
					<th>姓名</th>
					<th>最后充值日期</th>
					<th>最后消费日期</th>
					<th>最大充值金额(￥)</th>
					<th>合计充值金额(￥)</th>
				    <th>合计消费金额(￥)</th>
                    <th>账户余额(￥)</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="recharge_customer_top20" item="vo">
				<tr>
					<td>{$vo['user_name']}</td>
					<td>{$vo['recharge_time_max']||date='Y-m-d H:i',###}</td>
					<td>{$vo['charge_info']['charge_time_max']||date='Y-m-d H:i',###}</td>
				    <td style="text-align:right">{:money_number_format($vo['recharge_money_max'])}</td>
				    <td style="text-align:right">{:money_number_format($vo['recharge_money_sum'])}</td>
				    <td style="text-align:right">{:money_number_format($vo['charge_info']['charge_money_sum'])}</td>
				    <td style="text-align:right">{:money_number_format($vo['recharge_money_sum']-$vo['charge_info']['charge_money_sum'])}</td>
				</tr>
			    </foreach>
				<tr><td colspan = "4" style="text-align:center">合计(￥)</td>
					<td style="text-align:right">{:money_number_format($total_info['recharge_money_sum'])}</td>
					<td style="text-align:right">{:money_number_format($total_info['charge_money_sum'])}</td>
					<td style="text-align:right">{:money_number_format($total_info['customer_balance'])}</td>
				</tr>
			</tbody>
		</table>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<php>
		$lang_set=defined('LANG_SET')?LANG_SET:'';
		$thinkcmf_version=defined('THINKCMF_VERSION')?THINKCMF_VERSION:'';
	</php>
	<script>
	      //时间控件初始化
	
	</script>
</body>
</html>